import React from 'react'
import { Row, Col, Card, Button, Form, Input, message } from 'antd'
import logo from '../assets/head.jpg'
import { useNavigate } from 'react-router-dom'

function LogOut() {
  const navigate = useNavigate()
  return (
    <Row>
      <Col 
      md={{
        span: 8,
        push: 8
      }}
      xs={{
        span: 22,
        push: 1
      }}
      >
      <img className='loginImg' src={logo} />

      <Card className='loginCard' title="学生管理系统页面" bordered={false}>
        <Form labelCol={{
          md: {
            span: 4
          }
        }}
        onFinish={(n) => {
          message.success('登录成功')
          navigate('/admin/student_menu/student_type')
        }}
        >
          <Form.Item label="用户名" name="userName" rules={[
            {
              required: true,
              message: '请输入用户名'
            }
          ]}>
            <Input placeholder='请输入用户名' />
          </Form.Item>
          <Form.Item label="密码" name="password" rules={[
            {
              required: true,
              message: '请输入密码'
            }
          ]}>
            <Input placeholder='请输入密码' />
          </Form.Item>
          <Form.Item>
            <Button className='login' htmlType='submit' type='primary'>登录按钮</Button>
          </Form.Item>
        </Form>
      </Card>
      </Col>
    </Row>
  )
}

export default LogOut